import request from '@/utils/request'
// 获取轮播图
export const getSwipe = () => {
  return request('home/swiper')
}
// 租房小组
export const getGroups = () => {
  return request({
    url: '/home/groups?area=AREA%7C88cff55c-aaa4-e2e0'
  })
}

// 获取热门城市
export const getHotCity = () => {
  return request('/area/hot')
}
// 获取所有城市
export const getCity = (level) => {
  return request.get('/area/city', {
    params: {
      level
    }
  })
}
// 查询房屋
export const getHouse = (obj) => {
  return request.get('/houses', {
    params: {
      cityId: obj.value
    }
  })
}
// 获取房屋查询条件
export const getIf = (obj) => {
  return request.get('/houses/condition', {
    params: {
      id: obj.value
    }
  })
}
// 房屋筛选
export const getJqhouse = (obj, value) => {
  return request.get('/houses', {
    params: {
      cityId: obj.value,
      more: Object.values(value).join(',')
    }
  })
}
